﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace BuildMonitor.Engine
{
	public class ConsoleText : INotifyPropertyChanged
	{
		private readonly StringBuilder loggedData = new StringBuilder();
		public event PropertyChangedEventHandler PropertyChanged;

		public void WriteLine(string text)
		{
			loggedData.AppendLine(text);
			if (PropertyChanged != null)
				PropertyChanged(this, new PropertyChangedEventArgs("Text"));
		}

		public string Text
		{
			get
			{
				return loggedData.ToString();
			}
			private set { }
		}

	}
}
